! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
warnings treated as errors
Status:
RESOLVED: REMIND
Priority:
Very Low
Product:
Mousepad
Component:
General

Comments

Description Mike Massonnet editbugs 2006-04-20 07:40:15 CEST
Hello,

I tried to compile mousepad but had several warnings, caused of incorrect 
types. As I didn't know how to "not treat warnings as errors" I modified the 
sources.

The typical warning was:
cc1: warnings being treated as errors
file.c: In function 
Comment 1 Mike Massonnet editbugs 2006-04-20 07:42:30 CEST
Created attachment 508 
corrected types 

Here is the diff. 3 files in total caused warnings.
Cheers.
Comment 2 Mateusz Loskot 2006-04-21 23:40:59 CEST
Created attachment 514 
mousepad-signedness-fix

(In reply to comment #1)
> Created an attachment (id=508) [edit]
> corrected types 
> 
> Here is the diff. 3 files in total caused warnings.

I've noticed the same problem and applied similar fixes.
But I see your patch is not correct because it brokes const correctness regarding functions: g_strstr_len, g_strsplit. I think data member should be casted to const gchar* type. I attached this patch.
Comment 3 Mike Massonnet editbugs 2006-04-22 06:17:55 CEST
(In reply to comment #2)
> I've noticed the same problem and applied similar fixes.
> But I see your patch is not correct because it brokes const correctness
> regarding functions: g_strstr_len, g_strsplit. I think data member should be
> casted to const gchar* type. I attached this patch.
> 

Not really sure that this is necessary. Does you really need to cast on a const? Isn't it that the function behaves like to know "this var is const" and touching it will print warnings inside the function. Furthermore I really believe that g_strsre_len will *never* touch the string :)
Cheers.
Comment 4 Mike Massonnet editbugs 2006-07-13 21:55:12 CEST
Werror were disabled in trunk, so it compiles with warnings.

Bug #1692

Reported by:
Mike Massonnet
Reported on: 2006-04-20
Last modified on: 2006-07-13

People

Assignee:
Erik Harrison
CC List:
0 users

Version

Version:
Unspecified

Attachments

corrected types (1.35 KB, patch)
2006-04-20 07:42 CEST , Mike Massonnet
no flags
mousepad-signedness-fix (1.34 KB, patch)
2006-04-21 23:40 CEST , Mateusz Loskot
no flags

Additional information